package com.jeecg;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class WebServer {
	
	public void startServer(int port){
		try {
			ServerSocket serverSocket=new ServerSocket(port);
			while(true){
			Socket socket=serverSocket.accept();
			new Processor(socket).run();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		WebServer webServer=new WebServer();
		webServer.startServer(80);
	}

}
